Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for namespace="<window>" names that clash with variable names #9867

Merged
merged 5 commits into from
Dec 5, 2023

Conversation

niloc132
Copy link
Member

For example:

@JsMethod(namespace = "")
static native boolean isNaN();

private void test() {
boolean isNaN = isNaN();
}

will incorrectly infer that the method isNaN and the variable isNaN
refer to the same program element and use the name assigned to the
variable for both.

Fixes #9573

rluble and others added 4 commits November 29, 2017 10:25
For example:

  @JsMethod(namespace = "<window>")
  static native boolean isNaN();

  private void test() {
    boolean isNaN = isNaN();
  }

will incorrectly infer that the method isNaN and the variable isNaN
refer to the same program element and use the name assigned to the
variable for both.

Bug: gwtproject#9573
Bug-Link: gwtproject#9573
Change-Id: I48eecdae468c6159b3f49ccf3fee4f64c1889d88
@niloc132 niloc132 added this to the 2.11 milestone Nov 16, 2023
@niloc132
Copy link
Member Author

Passing nightly builds https://github.com/niloc132/gwt/actions/runs/6885094990

@niloc132 niloc132 merged commit f9028fe into gwtproject:main Dec 5, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Name conflict between JS method name and local variable
2 participants